-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcs: Add SCSIDevice type with remove operation #1741
Conversation
Could you explain more about why you chose to go with this new "SCSIDevice" type? Is the goal to eventually expand that type to also handle other actions like attaching the device? Why the name "SCSIDevice"? |
Is there another way of representing this you have in mind? |
Okay I spent some time investigating this and I think that I agree this is the best approach. However, for naming, what do you think about "LCOWVirtualDisk" instead? The type that we use for mounting the SCSI device is referred to as "LCOWMappedVirtualDisk". This type is meant to represent a mounted scsi device in the guest. Following that pattern of naming, something like "LCOWVirtualDisk" could be used to indicate that this type is for dealing specifically with the virtual device itself, not a mount. We should also make it clear that this type is not meant to be expanded at all, especially not for scsi mount features in the future. |
I think I'd like to keep the naming as |
Seems reasonable to me, I'm fine with keeping it then. Could we still add a comment about what it should and should not be used for? |
Sure, but can you let me know what you feel is missing from this comment?
|
We have a lot of terms that we overload throughout, so I think it would be best to make it explicit that this should not be used for management of a scsi mount. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just the small comment otherwise lgtm
I've improved the comment. |
SCSI devices must be unplugged by the guest before removal on the host side, to ensure smooth operation. Previously a SCSI device was unplugged when a LCOWMappedVirtualDisk entry was removed. However, we want to support multiple mounts per disk, which means we need to decouple unplug from unmount. This change introduces a new SCSIDevice resource type that has a remove operation that can be used by the host to trigger an explicit unplug via SCSI. This is a breaking change to the bridge protocol: - With new host/old guest, the host will attempt a SCSIDevice remove which will fail due to being unsupported by the guest. - With old host/new guest, the host will expect the device to be unplugged when the disk is removed, which will no longer occur. Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
CI failures are not related. |
This PR updates our ADO fork to commits in hcsshim up to commit hash [7769a64](7769a64). This includes support for partitioned scsi devices and ensuring filesystem format for lcow scsi devices. Related work items: #1728, #1740, #1741, #1742, #1743, #1744, #1745, #1747, #1748, #1749, #1750, #1752, #1754, #1756, #1757, #1767, #1769, #1771, #1772, #1773, #1779
This is commit 2/6 in a chain. Recommended to review in order. If reviewing a later PR in the chain, you can view individual commits to see just what that PR changes.
SCSI devices must be unplugged by the guest before removal on the host
side, to ensure smooth operation. Previously a SCSI device was unplugged
when a LCOWMappedVirtualDisk entry was removed. However, we want to
support multiple mounts per disk, which means we need to decouple unplug
from unmount.
This change introduces a new SCSIDevice resource type that has a remove
operation that can be used by the host to trigger an explicit unplug via
SCSI.
This is a breaking change to the bridge protocol:
which will fail due to being unsupported by the guest.
unplugged when the disk is removed, which will no longer occur.